package com.ssm.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import com.ssm.pojo.BookInfo;
import com.ssm.repository.BookInfoRepository;
import com.ssm.service.BookInfoService;
@Service("bookInfoService")
public class BookInfoServiceImpl implements BookInfoService {
	@Resource
	private BookInfoRepository bookInfoRepository;
	@Override
	public List<BookInfo> queryList(@Param("bookName") String bookName,
			@Param("pageSize") Integer pageSize, @Param("from") Integer from) {
		return bookInfoRepository.queryList(bookName, pageSize, from);
	}

	@Override
	public List<BookInfo>  queryListById(@Param("bookId") Integer bookId) {
		return bookInfoRepository.queryListById(bookId);
	}

	@Override
	public Integer addBookInfo(BookInfo bookInfo) {
		return bookInfoRepository.addBookInfo(bookInfo);
	}

	@Override
	public Integer updateBookInfo(BookInfo bookInfo) {
		return bookInfoRepository.updateBookInfo(bookInfo);
	}

	@Override
	public Integer deleteBookInfo(@Param("bookId") Integer bookId) {
		return bookInfoRepository.deleteBookInfo(bookId);
	}

}
